//引入全局字体
@import "../../app.less";

.titleText(@fontSize) {
  font-size: @fontSize;
  font-family: 'ruizizhenyan', sans-serif;
  color: #333333;
}

.mainText(@fontSize) {
  font-size: @fontSize;
  font-family: 'dingding', sans-serif;
  color: #9D9D9D;
}

//标题部分
.head {
  height: 7vh;
  width: 94%;
  background-color: #171C34;
  .flexbox(row);
  justify-content: space-between;
  padding: 0 3% 0 3%;

  .searchIcon {
    height: 20px;
    width: 20px;
  }

  .text {
    .titleText(1rem);
    color: #ffffff;
    letter-spacing: 5px;
  }

  .invisible {
    opacity: 0%;
  }

  .input {
    background-color: #ffffff;
    border-radius: 100px;
    width: 80%;
    height: 2rem;
    .flexbox(row);
    justify-content: flex-start;
    padding: 0 5% 0 5%;

    image {
      height: 17px;
      width: 17px;
    }

    input{
      font-size: 0.75rem;
      padding: 0 2% 0 2%;
      letter-spacing: 2px;
    }
  }
}

//背景部分
.mainBox {
  position: absolute;
  height: 100%;
  width: 100%;
  z-index: 0;

  .backGround {
    position: absolute;
    right: -40vw;
    top: 35vh;
    scale: 320%;
    opacity: 35%;
  }

  .mask {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: hsla(240, 1%, 95%, 0.8);
    z-index: 1;
    overflow: hidden;
  }
}

//主要部分
.main {
  height: 80vh;
  width: 100%;
  overflow-y: scroll;
}

// 轮播图
swiper {
  z-index: 2;
  height: 45vw;
  width: 90%;
  margin: 20px;
  margin-left: auto;
  margin-right: auto;

  image {
    width: 100%;
    height: 100%;
  }
}

//两三角形的高度计算
@total-height: 12px;
@triangle-height: 5px;
@top-margin: (@total-height - @triangle-height) - 5px;

//组织列表
.container {
  z-index: 2;
  .flexbox(column);
  height: auto;
  width: auto;
  margin: 3% 5% 0 5%;

  .title {
    z-index: 2;
    .flexbox(row);
    justify-content: start;
    width: 100%;

    .block {
      height: 1.25rem;
      background-color: @baseColor;
      width: 6px;
    }

    text {
      .titleText(1.25rem);
      margin-left: 5px;
    }
  }

  .sort {
    z-index: 2;
    .flexbox(row);
    justify-content: space-between;
    width: 100%;
    margin: 5px;

    .single {
      .flexbox(row);

      text {
        color: #858585;
        font-size: @total-height;
      }

      .select {
        height: 100%;
        margin: 5px;
        .flexbox(column);

        image {
          height: @triangle-height;
          width: 8px;
        }

        .top {
          margin-bottom: @top-margin;
        }

        .bottom {
          transform: rotate(180deg);
        }
      }
    }
  }

  @organizationHeight: 66px;
  @heightInIpad: 120px;

  .organization {
    .flexbox(row);
    justify-content: flex-start;
    z-index: 2;
    background-color: #ffffff;
    border-radius: 20px;
    width: 100%;
    height: auto;
    padding: 10px;
    margin: 10px 0 10px 0;

    .avatar {
      z-index: 3;
      height: @organizationHeight;
      width: @organizationHeight;

      //根据页面宽度修改图片尺寸
      @media screen and (min-width : 500px) and (max-width:2000px) {
        height: @heightInIpad;
        width: @heightInIpad + 10px;
      }

      border-radius: 10px;
      margin: 5px 10px 5px 10px;
      box-shadow:6px 6px 6px rgba(0, 0, 0, 0.1),
      -10px -10px 10px white;
    }

    .content {
      width: 70%;
      height: @organizationHeight;
      margin-right: 10px;
      margin-left: 10px;

      //根据页面宽度修改页面尺寸
      @media screen and (min-width : 500px) and (max-width:2000px) {
        height: @heightInIpad;
        width: 80%;
        margin-left: 20px;
      }

      .flexbox(column);

      .top {
        width: 100%;
        .flexbox(row);
        justify-content: space-between;
        margin-bottom: 5px;

        .name {
          .titleText(1rem)
        }

        .hot {
          height: 100%;
          width: auto;
          .flexbox(row);

          image {
            @imgHeight: 20px;
            width: @imgHeight;
            height: @imgHeight;
          }

          text {
            .titleText(1rem);
            color: #FF7B00;
            display: block;
            height: 20px;
            margin-left: 3px;
          }
        }
      }

      .description {
        width: 100%;
        height: 70%;
        overflow-wrap: break-word;
        .mainText(0.75rem)
      }
    }
  }

  .tips {
    margin: 10px 0 10px 0;
    width: 100%;
    padding: 10px;
    .flexbox(column);
    color: #333333;
    z-index: 2;
    text-align: center;
  }
}

/* 根据设备屏幕高度调整背景图片大小和位置 */
@media screen and (max-height: 580px) {

  .mainBox .backGround {
    position: absolute;
    right: -50vw;
    top: 24vh;
    scale: 220%;
    opacity: 35%;
  }

}

@media screen and (min-height:580px) and (max-height: 680px) {

  .mainBox .backGround {
    position: absolute;
    right: -40vw;
    top: 28vh;
    scale: 250%;
    opacity: 35%;
  }

}

@media screen and (min-height: 680px) and (max-height:850px) {

  .mainBox .backGround {
    position: absolute;
    right: -40vw;
    top: 27vh;
    scale: 300%;
    opacity: 35%;
  }

}

@media screen and (min-height: 850px) and (max-height:1000px) {

  .mainBox .backGround {
    position: absolute;
    right: -40vw;
    top: 27vh;
    scale: 340%;
    opacity: 35%;
  }
}

@media screen and (min-height: 1000px) and (max-height:1150px) {

  .mainBox .backGround {
    position: absolute;
    right: -20vw;
    top: 33vh;
    scale: 450%;
    opacity: 35%;
  }
}

@media screen and (min-height: 1150px) {

  .mainBox .backGround {
    position: absolute;
    right: -16vw;
    top: 36vh;
    scale: 480%;
    opacity: 35%;
  }
}